<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width" name="viewport">
    <meta content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <link rel="stylesheet" href="/touchscreenstyle/css/wap.css">
    <script src="/wsyystyle/js/jquery-1.7.2.min.js"></script>
    <title>预约查询</title>
</head>
<body>
<div class="search">
    <div class="search_main3">
        <dl>
            <dt>请输入您预约办理的身份证号</dt>
            <dd><input id="slbh" type="text" placeholder="请输入身份证号" class="inputText"></dd>
            <dd style="color:#999">（身份证号必须输入完整，与预约填写身份证号一致）</dd>
        </dl>
    </div>
    <a onclick="chaxun()">
        <div class="button">点 击 查 询</div>
    </a>
</div>
<script>
    function chaxun() {
        var cardNum = document.getElementById("slbh").value;
        if (cardNum == "") {
            alert("请输入身份证号码！");
            document.getElementById("idNum").focus();
            return false;
        } else {
            //传入身份号码，根据特定的算法进行判断验证，计算出最后传入的身份证号码是否正确。
            /*  身份证验证  开始  */
            var identNumber = cardNum;
            if (!(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(identNumber))) {
                alert("请输入正确的身份证号码!");
                return false;
            }
            //身份证号码为15位或者18位，15位时全为数字，18位前17位为数字，最后一位是校验位，可能为数字或字符X。
            if (!(/(^\d{15}$)|(^\d{17}([0-9]|X)$)/.test(identNumber))) {
                alert("请输入正确的身份证号码!");
                return false;
            }
            //校验位按照ISO 7064:1983.MOD 11-2的规定生成，X可以认为是数字10。
            //下面分别分析出生日期和校验位
            var len, re;
            len = identNumber.length;
            //判断18位身份证号码，现在在国家统一身份证为18位。
            if (len == 18) {
                re = new RegExp(/^(\d{6})(\d{4})(\d{2})(\d{2})(\d{3})([0-9]|X)$/);
                var arrSplit = identNumber.match(re);
                //检查生日日期是否正确
                var dtmBirth = new Date(arrSplit[2] + "/" + arrSplit[3] + "/" + arrSplit[4]);
                var bGoodDay;
                bGoodDay = (dtmBirth.getFullYear() == Number(arrSplit[2])) && ((dtmBirth.getMonth() + 1) == Number(arrSplit[3])) && (dtmBirth.getDate() == Number(arrSplit[4]));
                if (!bGoodDay) {
                    alert("请输入正确的身份证号码!");
                    return false;
                } else {
                    //检验18位身份证的校验码是否正确。
                    //校验位按照ISO 7064:1983.MOD 11-2的规定生成，X可以认为是数字10。
                    var valnum;
                    var arrInt = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2);
                    var arrCh = new Array('1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2');
                    var nTemp = 0, i;
                    for (i = 0; i < 17; i++) {
                        nTemp += identNumber.substr(i, 1) * arrInt[i];
                    }
                    valnum = arrCh[nTemp % 11];
                    if (valnum != identNumber.substr(17, 1)) {
                        alert("请输入正确的身份证号码!");
                        return false;
                    }
                }
            } else {
                alert("请输入正确的身份证号码!");
                return false;
            }
            /*  身份证验证  结束  */
        }
        window.open("getInfo?card=" + cardNum);
    }

    //字符串包含测试函数
    function contain(str, charset) {
        var i;
        for (i = 0; i < charset.length; i++)
            if (str.indexOf(charset.charAt(i)) >= 0)
                return true;
    }
</script>


<style>PANTOOL-PLUGIN {
    display: inline;
    cursor: pointer;
}

PANTOOL-PLUGIN-TIPS {
    white-space: nowrap;
}

.PANTOOL-PLUGIN-VALIDATE-NOTPASS {
    text-decoration: line-through;
    color: #ccc;
}

PANTOOL-PLUGIN-TIPS::before {
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    box-sizing: border-box;
    width: 1em;
    height: 1em;
    margin: 0 1px .15em 1px;
    vertical-align: middle;
    display: inline-block;
}

.PANTOOL-PLUGIN-VALIDATE-NOTPASS > PANTOOL-PLUGIN-TIPS::before {
    content: '';
    background-image: url()
}

.PANTOOL-PLUGIN-VALIDATE-PASS > PANTOOL-PLUGIN-TIPS::before {
    content: '';
    background-image: url()
}

.PANTOOL-PLUGIN-VALIDATE-UNCERTAINTY > PANTOOL-PLUGIN-TIPS::before {
    content: '';
    background-image: url()
}

.PANTOOL-PLUGIN-VALIDATE-LOCK > PANTOOL-PLUGIN-TIPS::before {
    content: '';
    background-image: url()
}</style>
<div class="xl-chrome-ext-bar" id="xl_chrome_ext_{4DB361DE-01F7-4376-B494-639E489D19ED}" style="display: none;">
    <div class="xl-chrome-ext-bar__logo"></div>

    <a id="xl_chrome_ext_download" href="javascript:;" class="xl-chrome-ext-bar__option">下载视频</a>
    <a id="xl_chrome_ext_close" href="javascript:;" class="xl-chrome-ext-bar__close"></a>
</div>
</body>
</html>